package com.aaa.system.dao;

import com.aaa.entity.Permission;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @program: qy158-cai-parent
 * @description:
 * @author: 闫克起
 * @create: 2023-02-22 17:08
 **/
public interface PermissionDao extends BaseMapper<Permission> {
    @Select("select p.* from cc_permission p join cc_role_permission rp on p.id=rp.permission_id join cc_admin_role ar on rp.role_id=ar.role_id where ar.admin_id=#{userid}")
    List<Permission> selectPermissionByUserid(Integer userid);
}
